home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / bled.arc / BLED.DOC < prev    next >
Encoding:
Text File  |  1986-04-13  |  24.2 KB  |  567 lines

  1.      DOCUMENTATION for BLED version 1.3
  2.      by Ken Goosens, 5020 Portsmouth Road, Fairfax, VA 22032
  3.      13 April 1986
  4.  
  5.      CONTENTS
  6.  
  7.      What is BLED
  8.      What Use is BLED
  9.      What are the Advantages of BLED
  10.      New Features of BLED
  11.      How Does BLED Work
  12.      How do you Identify Lines
  13.      Line Number Merging
  14.      How to Invoke BLED
  15.      How BLED Runs
  16.      The Major BLED Functions
  17.      CONFIGURE
  18.      FILE COMPARE
  19.      LINE MERGE
  20.      MERGE
  21.      Stylistic Considerations
  22.  
  23.  
  24.      What is BLED
  25.  
  26.      BLED is  a Batch Line EDitor.  Editor - because it changes text files.
  27.      Line - because  it  operates  on  entire  lines  of  text  rather than
  28.      individual characters  or phrases.  And batch - because the changes to
  29.      be made are not  specified interactively,  but are  pre-specified in a
  30.      file describing the changes, which is created outside of BLED.
  31.  
  32.  
  33.      What Use is BLED?
  34.  
  35.      BLED is  most useful when different people have to communicate changes
  36.      to a text file that they jointly maintain.  The typical use of BLED is
  37.      for producing  modifications to source code for programs.  Interactive
  38.      Microsoft BASIC has long had  a  MERGE  command  which  functions like
  39.      BLED.  It  inserts, deletes, and replaces lines based on line numbers.
  40.      Other public domain programs  would  compare  two  BASIC  programs and
  41.      produce  a  merge  file  to  convert  one to the other using the merge
  42.      command.  BLED  is  a  generalized  program  that  combines  these two
  43.      functions.
  44.  
  45.  
  46.      What are the Advantages of BLED?
  47.  
  48.      o    Lines of text do not have to be numbered.
  49.  
  50.      This means  that BLED  will work with source code that allows lines of
  51.      code to have no  numbers, including  Mircosoft QuickBASIC,  as well as
  52.      Pascal and other languages.
  53.  
  54.  
  55.      o    Comment lines are supported.
  56.  
  57.      BLED comment  lines are  completely ignored  when merging.  This means
  58.      that documentation  can be  included right  inside a  BLED merge file.
  59.      One of  the disadvantages of the BASIC merge command was that the only
  60.      type of line possible was BASIC  code,  so  that  documentation  for a
  61.      merge always had to be included in a separate file.
  62.  
  63.      o    Logical lines can span multiple physical lines.
  64.  
  65.      One of  the more  disagreeable features of old BASIC was that a single
  66.      line of code (i.e. a line beginning with a  number) had  to be  on one
  67.      physical   line.    Newer   languages   like   QuickBASIC   support  a
  68.      line-continuation character (e.g the underscore) that  allows the same
  69.      logical line  to span  multiple physical lines.  This greatly improves
  70.      the readability of source  code by  allowing grouping  by indentation.
  71.      BLED recognizes and supports logical lines.
  72.  
  73.      o    Can be run batch from DOS, or interactively.
  74.  
  75.      Commands telling  BLED what  to do  can be specified as DOS arguments,
  76.      and BLED has a batch mode in which it will run without further prompts
  77.      and return  automatically to  DOS.  BLED will prompt for any arguments
  78.      it needs which are not specified.
  79.  
  80.      o    Configurable.
  81.  
  82.      BLED comes pre-set to  work  with  Microsoft  QuickBASIC,  but  can be
  83.      configured to work with different languages.
  84.  
  85.  
  86.      New Features of BLED
  87.  
  88.      BLED 1.3 fixes a bug.  If a line begins with a comment other than in
  89.      column 1 and ends with a line continuation character (e.g. source code
  90.      commented out), BLED would get not correctly identify the line as a
  91.      comment and would get an illegal function call.
  92.  
  93.      BLED 1.2 has two two features: (1) autodocumenting merge, and (2) test
  94.      run mode.
  95.  
  96.      AUTODOCUMENTING.   When you do a file compare to produce a merge, BLED
  97.      produces a  header on  what files were used to make the merge and date
  98.      and time stamps the merge.  Also, BLED  produces a  header comment for
  99.      each change indicating whether the line is being INSERTED, DELETED, or
  100.      REPLACED (changed).  Also, for replacement lines longer than one line,
  101.      BLED will insert a comment marking the first different line.
  102.  
  103.      TEST MODE.   There is a new "T" (for Test) parameter.  This limits the
  104.      run to a specificed number of logical lines in the  master file.   You
  105.      will not normally use this parameter.
  106.  
  107.  
  108.      How Does BLED Work?
  109.  
  110.      Like a  block editor.   Think of how you would work with a full screen
  111.      text editor, if you  had to  work from  the top  to the  bottom of the
  112.      file.  You basically do two things:
  113.  
  114.      o    Mark a block of lines.
  115.  
  116.      o    Say what  to do  with the block - either keep, delete, or replace
  117.           by another block of code; or insert a block of code.
  118.  
  119.      BLED has a BLOCK command to identify the block of text, followed  by a
  120.      disposition  command  of  KEEP,  DELETE,  REPLACE, or INSERT.  This is
  121.      BLED's general MERGE.
  122.  
  123.  
  124.      How do You Identify Lines?
  125.  
  126.      You have to specify what blocks of lines you want to work with.  There
  127.      are three ways.
  128.  
  129.      o    By physical line number.
  130.  
  131.      The  absolute  physical  line  numbers are 1,2,3,etc. for each line of
  132.      text.  Relative lines can also  be  specified,  e.g. from  the current
  133.      position in the file forward three lines.
  134.  
  135.      o    By line labels.
  136.  
  137.      Line labels  are identifiers  or names  for lines.  BLED supports both
  138.      numeric line labels (it calls  them  label  numbers)  and alphanumeric
  139.      labels (simply labels).  BLED ASSUMES THAT A LINE LABEL OCCURS ONLY AS
  140.      THE FIRST WORD ON A LINE.  Some  languages allow  labels to  be put in
  141.      the  middle  of  a  physical  line,  but  this is bad practice because
  142.      interior labels are hard to find.
  143.  
  144.      o    By strings.
  145.  
  146.      Strings are just sequences of characters that can occur inside lines.
  147.  
  148.      So, in BLED, a block can be identified as beginning or ending  with an
  149.      absolute or relative line number, a line label, or a string.  And so a
  150.      block can be defined as
  151.  
  152.           the first five lines
  153.           everything between label-1 and label-2
  154.           from line 50 to label-1
  155.           from label-1 to the line with "HELP" in it
  156.  
  157.  
  158.      Line Number Merging
  159.  
  160.      BLED also supports  a  more  specialized  merge  much  like  the BASIC
  161.      merge.  Details  are given  below.   This line merge mode is just like
  162.      the BASIC merge command except that  logical blocks  of physical lines
  163.      replace the single physical line, and comment lines are supported.
  164.  
  165.      BLED  supports   the  specialized   line  number   merge  because  the
  166.      assumptions  greatly  simplify  the  merge  files.   No  special  BLED
  167.      commands are required:  no blocks, no block dispositions.  To insert a
  168.      line, just give it a line  number between  the original  line numbers.
  169.      To delete,  put only  the line  number in the merge file.  To replace,
  170.      use the same line number.
  171.  
  172.      The BLED line number merge treats all lines between line  numbers as a
  173.      single block,  i.e. as  if they  are one  single logical line, even if
  174.      they are multiple physical  and logical  lines.   For example,  in the
  175.      BASIC code
  176.  
  177.                200 X = X+1
  178.                    IF X>5 THEN_
  179.                      Y=0
  180.                210 Y = Y+1
  181.  
  182.      you might  think that  you could  delete the  first line 200 by having
  183.      "200" alone in the merge.   In fact,  the first  three lines  would be
  184.      deleted rather than the first only.
  185.  
  186.  
  187.      How to Invoke BLED
  188.  
  189.      BLED is invoked at DOS by typing
  190.  
  191.          BLED[/options] [spec-1] [spec-2] [spec-3] [spec-4] [spec-5]
  192.          where a spec has the format [drive:][\path\][filename]
  193.  
  194.      Everything in  brackets is  optional and  may be omitted.  The options
  195.      after BLED are
  196.           /B   -    run batch.  Means to ask no questions and automatically
  197.                     return  to  DOS  when  done.   Must be used with one of
  198.                     following options and requires first three specs.
  199.  
  200.           /F   -    file compare.  Means to produce a merge file which will
  201.                     transform spec-1  (old version) into spec-2.  Output is
  202.                     spec-3.
  203.  
  204.           /L   -    line number merge.  Do a  merge of  spec-2 into spec-1,
  205.                     based  on   line  number  identifiers  in  both  files,
  206.                     outputting to spec-3.
  207.  
  208.           /M   -    general merge based  on  BLED  commands.    Into spec-1
  209.                     merge spec-2, producing spec-3.
  210.  
  211.           /T=XXX -  test mode.  Do not process all line from master (first)
  212.                     file.  Instead, end the  run  after  processing  XXX (a
  213.                     number)  of  logical  lines  in  the master file.  Used
  214.                     mainly for testing BLED.  So you can  run against large
  215.                     real files without having to create smaller samples.
  216.  
  217.      Note:  /F,/L,/M  options  are  incompatible  and  at  most  one can be
  218.      specified.  BLED checks  for consistency  and required  parameters and
  219.      will abort  with an  error message  and help.  Optional parameters not
  220.      specified at DOS are supplied using full screen prompts.
  221.  
  222.      Spec-4 is used when you want to override the default warning file name
  223.      (WARNING is the default configuration value).  BLED keeps appending to
  224.      the warning file as long as you continue to run within it.   Each time
  225.      you reenter  BLED from  DOS, however,  BLED will begin overwriting the
  226.      warning file.  The override is useful if you want to preserve previous
  227.      warning files.
  228.  
  229.      Spec-5  is  for  overriding  the  default  configuration  file name of
  230.      BLED.CFG.
  231.  
  232.      Note:  the meaning of the first three file specs is different  for the
  233.      /F option.  Merges mean
  234.  
  235.                [source file]  [merges]   [source+merge]
  236.  
  237.      But for the /F option the specs mean
  238.  
  239.                [old version]  [new version]  [merges]
  240.  
  241.  
  242.      How BLED Runs
  243.  
  244.      BLED makes  a single pass through the original file, doing comparisons
  245.      to the second file.  Therefor all references to line  labels should be
  246.      in the  same order they occur in the original file.  BLED gives an on-
  247.      screen status report of what it is doing,  the files  it is  using, as
  248.      well as  counts of  the number  of records  it reads and writes at the
  249.      bottom of the screen.
  250.  
  251.      The Major BLED Functions
  252.  
  253.      The four major BLED functions are
  254.  
  255.      o    CONFIGURE.  General configuration parameters.
  256.  
  257.      o    FILE COMPARE.  Create a merge file.
  258.  
  259.      o    LINE MERGE.  Merge based on line number labels.
  260.  
  261.      o    MERGE.  Merge using explicit  BLED  block  and  block disposition
  262.           commands.
  263.  
  264.      The main menu in BLED uses the first letter of each choice.
  265.  
  266.  
  267.      CONFIGURE
  268.  
  269.      BLED  has  10  configuration  parameters,  which  are  stored  in  the
  270.      configuration file BLED.CFG.   If no  configuration file  exists, BLED
  271.      uses as a default parameters suitable for QuickBASIC.
  272.  
  273.      (1)  Default extension for source files.  If no extension is given for
  274.           source files, BLED will  add this.   Default  for this  option is
  275.           BAS.  Source files include spec-1, and also spec-3 for merges and
  276.           spec-2 for file compares.
  277.  
  278.      (2)  Default extension for changes to  source.    If  no  extension is
  279.           given for this file, BLED will add this.  Default for this option
  280.           is MRG.  In merges, this  applies to  spec-2.   In file compares,
  281.           this applies to spec-3.
  282.  
  283.      (3)  Character using to begin remarks in source.  Default character is
  284.           the single quote (').    When  looking  for  a  line continuation
  285.           character at  the end  of a line, BLED will ignore all text after
  286.           the remark character.
  287.  
  288.      (4)  BLED phrase indicating end of  block.    Used  with  INSERT BLOCK
  289.           command.   What follows is a block of code to be inserted.  Tells
  290.           BLED where the code ends.
  291.  
  292.      (5)  Character beginning a line  of  BLED  documentation.    BLED will
  293.           completely  ignore  a  line  beginning  with  this character when
  294.           merging.  Allows comments or documentation  to be  included right
  295.           in a merge file to explain changes.  The character need not be in
  296.           column 1 - only the first non-blank character.   Default  is "*".
  297.           The  documentation  character  should  never  occur  as the first
  298.           character in your source text.
  299.  
  300.      (6)  Character at end of  every alphanumeric  label.   Default is ":".
  301.           BLED assumes  that line  labels occur only as the first word in a
  302.           line.  Leading spaces are ignored,  so that  labels can  begin in
  303.           any column.   This label character is used by BLED to help locate
  304.           labels.  When specifying blocks in a BLED  command, you  need not
  305.           include the  end-character.   BLED knows,  for example, what when
  306.           you say "LABEL LOOPER" that "LOOPER:" is what  actually occurs in
  307.           the source code.
  308.  
  309.      (7)  Character beginning  BLED commands.   Default  is none.  BLED can
  310.           distinguish its commands from source code lines by when a command
  311.           is needed and by key phrase.  If confusion might result, however,
  312.           you can specify that  BLED commands  begin with  a character that
  313.           will never  occur at  the beginning  of a  line of  text, such as
  314.           possibly "$" or "-".
  315.  
  316.      (8)  Whether case is ignored in alphanumeric labels.   Default is yes,
  317.           so that "looper" and "LOOPER" are treated as the same.
  318.  
  319.      (9)  Line continuation  character.  One way for a logical line to span
  320.           multiple physical lines is to insert a special  line continuation
  321.           character at  the end  of a  line that logically continues on the
  322.           following line.  Default is  "_"  (underscore).    May  differ in
  323.           languages other  than QuickBASIC.   Many other freeform languages
  324.           use  a  statement  terminator   character.      Fortran   puts  a
  325.           continuation  character  in  column  6, which is not supported by
  326.           BLED.  (BLED can still work on FORTRAN files though.)
  327.  
  328.      (10) File that warning messages  are written  to.   From the  time you
  329.           enter BLED  until you  exit DOS,  BLED may issue warning messages
  330.           based on its  file  comparison  or  merge.    These  messages are
  331.           written to  this file  for perusal  later.  This way BLED can run
  332.           completely batch with no  loss of  information.   You can nullify
  333.           these  messages  by  making  the  file "NUL:" or send them to the
  334.           screen using  "SCRN:".   BLED will  report the  number of warning
  335.           messages during  its operation.   Sending  messages to the screen
  336.           will interfere with BLED's normal report  of its  progress on the
  337.           screen.  The default name for this warning is "WARNING".
  338.  
  339.  
  340.      FILE COMPARE
  341.  
  342.      The function  of this module is to produce a BLED merge file that will
  343.      convert an old version of a file to a new, modified version.  All that
  344.      is in the merge are the necessary changes.  This is a very complex and
  345.      difficult programming task which is only partially implemented  in the
  346.      current version.   The  file comparison will only work for source with
  347.      line number labels.  Essentially,  the  assumption  is  that  the line
  348.      number labels  are ordered  from low  to high  in both versions of the
  349.      file.  A comparison utility must  have  some  way  to  identify lines.
  350.      Ideally, this  constraint should  be relaxed  to apply to alphanumeric
  351.      labels with no assumptions about order.  Please send me  your ideas or
  352.      code changes  if you  think you  can solve this problem.  So, the ONLY
  353.      TYPE OF MERGE FILE THAT FILE COMPARISON WILL  PRODUCE IS  ONE FOR LINE
  354.      MERGING, and not for general merging.
  355.  
  356.      Operationally, this  means that  if you  are not using line numbers in
  357.      your source code, you should make  your  code  changes  directly  in a
  358.      merge file, and apply the merge file to produce the modified code.  If
  359.      you directly change the old version, there will  be no  way to isolate
  360.      just the changes later.
  361.  
  362.      NOTE: the BLED file compare is NOT A GENERAL FILE COMPARE.  General
  363.      file compares, like the DOS utility, compare two files by relative
  364.      byte position with a file.  BLED does a logical line by logical
  365.      line compare.  Apply the BLED file compare ONLY TO COMPILEABLE SOURCE
  366.      CODE, otherwise the result will be unpredictable.
  367.  
  368.  
  369.      LINE MERGE
  370.  
  371.      This  option  is  a  generalization  of  the BASIC merge command.  The
  372.      assumptions are that
  373.  
  374.      o    the lines of code are numbered at the beginning of a line.
  375.  
  376.      o    Physical lines of text are to be blocked from a line number up to
  377.           the next  line number.  The merge operates only on such blocks as
  378.           a unit.
  379.  
  380.      o    The line numbers are ordered from low to high in  both the source
  381.           and merge file.
  382.  
  383.      o    Lines in  the source  not in the merge file are to be kept, lines
  384.           in the merge not in the source are to be  inserted, and  lines in
  385.           both are  to be  replaced by  the line  (i.e. block) in the merge
  386.           file.
  387.  
  388.      o    Lines in the merge file with only a line number are to be deleted
  389.           from the source file.
  390.  
  391.      o    The merge maintains the low to high line number order.
  392.  
  393.  
  394.      MERGE
  395.  
  396.      The general  merge in  BLED allows  merges even when there are no line
  397.      numbers.  The BLED  commands are  BLOCK, INSERT,  DELETE, REPLACE, and
  398.      KEEP.  Each of these commands can be abbreviated by their first letter
  399.      (e.g "B FROM LINE 1 TO LINE 5" means "BLOCK FROM LINE  1 TO  LINE 5").
  400.      The syntax is
  401.  
  402.      BLOCK [FROM] [linetype] lineid [TO/UPTO/THRU] [linetype] lineid
  403.      [block disposition] [lineid]
  404.  
  405.      where [linetype] is LINE/LABEL/LABEL#/STRING.
  406.  
  407.      The BLOCK  command is  for marking  a block of text in the source file
  408.      (spec-1).  It must specify where the block begins and ends.  The first
  409.      three phrases  after BLOCK  identify the beginning, the last three the
  410.      end.   All phrases  enclosed in  brackets are  optional.   LINE is the
  411.      default linetype if none is specified.
  412.  
  413.      Linetype has four options.
  414.  
  415.      o    LINE means the physical line number, either absolute or relative.
  416.  
  417.      The lineid  distinguishes the two.  Absolute line numbers are positive
  418.      integers, relative line numbers  are  "*+n",  where  n  is  a positive
  419.      integer.
  420.  
  421.      o    LABEL means an alphanumeric label.
  422.  
  423.      o    LABEL# means a numeric line label (a positive integer).
  424.  
  425.      o    STRING means a string of characters.
  426.  
  427.      LABELS must be the first word on a line, STRINGS can occur anywhere in
  428.      a line.
  429.  
  430.      Lineid matches with the  linetype.   LABEL and  STRING require  a word
  431.      with any  characters.   LABEL# requires  a positive integer.  And line
  432.      requires either a positive  integer, or  the string  "*+" to  mean the
  433.      current line  in the  text file  plus" a  positive number, or the word
  434.      "END" to indicate thru the end of file.
  435.  
  436.      The phrase TO and UPTO are  equivalent.    They  mean  up  to  but not
  437.      including.    The  phrase  THRU  means  up  to and include.  TO is the
  438.      default if no phrase is specified.
  439.  
  440.      There are  three block  dispositions: KEEP/DELETE/REPLACE.   They tell
  441.      BLED what  to do  with a  defined block  and therefor  make sense only
  442.      after a BLOCK command.  DELETE deletes the block, KEEP keeps it.
  443.  
  444.           REPLACE [BLOCK/n]
  445.  
  446.      This replaces a defined block with  another.   The "n"  means that the
  447.      next n  physical lines  go in  place of  the defined block.  And BLOCK
  448.      means that all following lines up  to  the  end-block  phrase  are the
  449.      replacements.
  450.  
  451.      Another BLED command is to insert new lines.
  452.  
  453.           INSERT [BLOCK/n]
  454.  
  455.      This means  to insert  a block of lines at the current position in the
  456.      source file, i.e. just  before the  current line  that has  been read.
  457.      The "n"  means to  insert the  following n  physical lines.  The BLOCK
  458.      means to take all following lines up to the end-block phrase.
  459.  
  460.      EXAMPLES
  461.  
  462.         (SOURCE)                           (MERGES)
  463.      CALL INITIALIZE              BLOCK FROM LINE 1 TO STRING OPENFILES
  464.      GOSUB OPENFILES              REPLACE 1
  465.      LOOPER:                      CALL HELP
  466.      IF X=1 THEN GOTO ALLDONE:    BLOCK FROM LINE * THRU LABEL ALLDONE 
  467.      X = X+1                      KEEP
  468.      GOTO LOOPER                  INSERT BLOCK
  469.      ALLDONE:                     CLOSE
  470.      END                          ENDBLOCK
  471.                       (RESULT)
  472.                    CALL HELP
  473.                    GOSUB OPENFILES
  474.                    LOOPER:
  475.                    IF X=1 THEN GOTO ALLDONE:
  476.                    X = X+1
  477.                    GOTO LOOPER
  478.                    ALLDONE:
  479.                    CLOSE
  480.                    END
  481.  
  482.               (SOURCE)                    (LINE MERGE)
  483.      110 IF GOT.COMMAND THEN_     115 NO.HELP = -1
  484.            IF NO.HELP THEN_       150 IF HELPFUL THEN_
  485.              PRINT "SORRY"              WHILE X>5 AND NOT EOF(2):_
  486.      120 GOSUB CHKFILES                   GOSUB CHECKER:_
  487.      150 IF HELPFUL THEN_               WEND
  488.             WHILE X>5:_           200
  489.               GOSUB CHECKER:_     220 END
  490.             WEND
  491.      200 IF X>10 THEN X=12
  492.  
  493.                          (RESULT)
  494.                   100 IF GOT.COMMAND THEN_
  495.                         IF NO.HELP THEN_
  496.                           PRINT "SORRY"
  497.                   115 NO.HELP = -1
  498.                   120 GOSUB CHKFILES
  499.                   150 IF HELPFUL THEN_
  500.                         WHILE X>5 AND NOT EOF(2):_
  501.                           GOSUB CHECKER:_
  502.                         WEND
  503.                   220 END
  504.  
  505.  
  506.      Stylistic Considerations
  507.  
  508.      A good merge file includes the following information at the top of the
  509.      file.
  510.  
  511.      o    author
  512.  
  513.      o    date of merge
  514.  
  515.      o    what merge is to be applied to
  516.  
  517.      o    how to apply the merge (line number merge, general merge?)
  518.  
  519.      o    a list of the general fixes or enhancements made, listed in order
  520.           of most to least important coupled.
  521.  
  522.      In the body of the merge the following documentation should be
  523.      included.
  524.  
  525.      o    a line by line explanation of the changes made stating what is
  526.           changed and why.  The explanation should precede the line.
  527.  
  528.      o    lines should be grouped together if they implement a common
  529.           function.
  530.  
  531.                           A Model Merge File
  532.  
  533.      ***************************************************************** 
  534.      *  EXAMPLE.MRG                                                  * 
  535.      *  by Ken Goosens   Jan 1, 1986                                 * 
  536.      *                                                               * 
  537.      *  to be applied to BLED.BAS version 1.1                        * 
  538.      *  using the general merge of BLED.EXE                          * 
  539.      *                                                               * 
  540.      *  This merge makes two changes:                                * 
  541.      *     (1) the defaults when no configuration exists are changed * 
  542.      *         to be appropriate for TURBO Pascal rather than        * 
  543.      *         QuickBASIC.                                           * 
  544.      *     (2) The warning message when no configuration file exists * 
  545.      *         is changed to beep and delay for 3 seconds rather     * 
  546.      *         than quietly and hurriedly display.                   * 
  547.      ***************************************************************** 
  548.       
  549.      * reset extensions for original and new files to "PAS" 
  550.       
  551.         BLOCK FROM LABEL USEDEFAULTS TO STRING ENDBLK 
  552.         REPLACE BLOCK 
  553.         USEDEFAULTS:      
  554.           DEORIGFILE$ = "PAS"  
  555.           DEBTCHCMDS$ = "MRG"  
  556.           DENEWFILE$  = "PAS"  
  557.         ENDBLOCK 
  558.       
  559.      * Change call from EXPLAIN to EXPERR 
  560.       
  561.      BLOCK FROM LABEL ERROPEN THRU STRING CALL 
  562.      REPLACE BLOCK 
  563.      ERROPEN:  
  564.         X$ = "Error"+STR$(ERR)+" opening file "+FF$  
  565.         CALL EXPERR (X$)  
  566.      ENDBLOCK 
  567.